package com.renjibo.sharkerwave.utils;

import android.app.Activity;
import android.graphics.Color;
import android.os.Build;
import android.view.View;

import com.renjibo.sharkerwave.R;
import com.renjibo.sharkerwave.ui.activity.BaseActivity;

/**
 * 任继波
 * Created by Administrator on 2017/4/10.
 */

public class ShowHideTop {

    public static void setWindow(Activity activity, boolean boo){
//        if(boo){
//            if (Build.VERSION.SDK_INT >= 21) {
//                View decorView = activity.getWindow().getDecorView();
//                int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
//                        | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
//                decorView.setSystemUiVisibility(option);
//                activity.getWindow().setStatusBarColor(Color.TRANSPARENT);
//            }
//        }else{
//            if (Build.VERSION.SDK_INT >= 21) {
//                View decorView = activity.getWindow().getDecorView();
//                int option = View.SYSTEM_UI_FLAG_VISIBLE;
//                decorView.setSystemUiVisibility(option);
//                activity.getWindow().setStatusBarColor(Color.alpha(R.color.colorPrimaryDark));
//            }
//        }
        if (Build.VERSION.SDK_INT >= 21) {
            View decorView = activity.getWindow().getDecorView();
            int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
            decorView.setSystemUiVisibility(option);
            activity.getWindow().setStatusBarColor(Color.TRANSPARENT);
        }

    }
}
